<template>
  <div class="home">
    <child @chose="getData" title="德玛西亚" :msg="msg" :arr="arr"></child>
    <div>{{msg}}</div>
  </div>
</template>

<script>
import child from '@/components/child/child'
export default {
  name: 'Home',
  provide: {
    name: '张三',
    age: 16
  },
  components: {
    child
  },
  data() {
    return {
      msg: 'hello world',
      title: undefined,
      arr: ['英雄', '云顶', '穿越', '王者']
    }
  },

  methods: {
    fun() {
      console.log('我是fun')
      return 'vue'
    },

    // getData(data, ar1, ar2, ar3) {
    //   console.log(data, ar1, ar2, ar3);
    // }
    getData() {
    this.msg = this.$children[0].type
    }
  }
}
</script>
